{"ast":null,"code":"var _jsxFileName = \"/data/messenger.client/src/pages/Home/Profile/index.tsx\",\n  _s = $RefreshSig$();\nimport React from 'react';\nimport { Home } from \"../../\";\nimport { Circle } from 'rc-progress';\nimport { observer } from \"mobx-react-lite\";\nimport { Context } from \"../../../index\";\nimport { profileCompletionPercentage } from \"../../../utils/User\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst Profile = () => {\n  _s();\n  const {\n    store\n  } = React.useContext(Context);\n  const [profilePercent, setProfilePercent] = React.useState(0);\n  const memoizedProfile = React.useMemo(() => profileCompletionPercentage(store.getProfile()), [store.getProfile()]);\n  React.useEffect(() => {\n    setProfilePercent(memoizedProfile);\n  }, [store.getProfile()]);\n  return /*#__PURE__*/_jsxDEV(Home, {\n    childrenFirst: /*#__PURE__*/_jsxDEV(\"div\", {\n      className: \"messenger__sidebar-item\",\n      children: [/*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"messenger__sidebar-item-header\",\n        children: /*#__PURE__*/_jsxDEV(\"div\", {\n          className: \"messenger__sidebar-item-header-top\",\n          children: /*#__PURE__*/_jsxDEV(\"span\", {\n            children: \"\\u041D\\u0430\\u0441\\u0442\\u0440\\u043E\\u0439\\u043A\\u0438 \\u043F\\u0440\\u043E\\u0444\\u0438\\u043B\\u044F\"\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 27,\n            columnNumber: 29\n          }, this)\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 26,\n          columnNumber: 25\n        }, this)\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 25,\n        columnNumber: 21\n      }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"messenger__sidebar-profile\",\n        children: [/*#__PURE__*/_jsxDEV(Circle, {\n          percent: profilePercent,\n          strokeWidth: 3,\n          className: \"messenger__sidebar-profile-progress\"\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 31,\n          columnNumber: 25\n        }, this), /*#__PURE__*/_jsxDEV(\"p\", {\n          className: \"messenger__sidebar-profile-progressInfo\",\n          children: [\"\\u041F\\u0440\\u043E\\u0444\\u0438\\u043B\\u044C \\u0437\\u0430\\u043F\\u043E\\u043B\\u043D\\u0435\\u043D \\u043D\\u0430: \", profilePercent.toString().slice(0, 5), \"%\"]\n        }, void 0, true, {\n          fileName: _jsxFileName,\n          lineNumber: 36,\n          columnNumber: 25\n        }, this)]\n      }, void 0, true, {\n        fileName: _jsxFileName,\n        lineNumber: 30,\n        columnNumber: 21\n      }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"messenger__sidebar-profileControl\"\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 40,\n        columnNumber: 21\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 24,\n      columnNumber: 17\n    }, this)\n  }, void 0, false, {\n    fileName: _jsxFileName,\n    lineNumber: 22,\n    columnNumber: 9\n  }, this);\n};\n_s(Profile, \"IlpBh26yguUhQIiIngNO0pAgWm0=\");\n_c = Profile;\nexport default _c2 = observer(Profile);\nvar _c, _c2;\n$RefreshReg$(_c, \"Profile\");\n$RefreshReg$(_c2, \"%default%\");","map":{"version":3,"names":["React","Home","Circle","observer","Context","profileCompletionPercentage","Profile","store","useContext","profilePercent","setProfilePercent","useState","memoizedProfile","useMemo","getProfile","useEffect","toString","slice"],"sources":["/data/messenger.client/src/pages/Home/Profile/index.tsx"],"sourcesContent":["import React from 'react';\nimport {Home} from \"../../\";\nimport  {Circle} from 'rc-progress';\nimport {observer} from \"mobx-react-lite\";\nimport {Context} from \"../../../index\";\nimport {profileCompletionPercentage} from \"../../../utils/User\";\n\nconst Profile = () => {\n    const {store} = React.useContext(Context);\n    const [profilePercent, setProfilePercent] = React.useState<number>(0);\n\n    const memoizedProfile = React.useMemo(\n        () => profileCompletionPercentage(store.getProfile()),\n        [store.getProfile()]\n    );\n\n    React.useEffect(() => {\n        setProfilePercent(memoizedProfile);\n    },[store.getProfile()]);\n\n    return (\n        <Home\n            childrenFirst={\n                <div className=\"messenger__sidebar-item\">\n                    <div className=\"messenger__sidebar-item-header\">\n                        <div className=\"messenger__sidebar-item-header-top\">\n                            <span>Настройки профиля</span>\n                        </div>\n                    </div>\n                    <div className=\"messenger__sidebar-profile\">\n                        <Circle\n                            percent={profilePercent}\n                            strokeWidth={3}\n                            className=\"messenger__sidebar-profile-progress\"\n                        />\n                        <p className=\"messenger__sidebar-profile-progressInfo\">\n                            Профиль заполнен на: {profilePercent.toString().slice(0, 5)}%\n                        </p>\n                    </div>\n                    <div className=\"messenger__sidebar-profileControl\">\n                        \n                    </div>\n                </div>\n            }\n        />\n    );\n}\n\nexport default observer(Profile);"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,QAAO,QAAQ;AAC3B,SAASC,MAAM,QAAO,aAAa;AACnC,SAAQC,QAAQ,QAAO,iBAAiB;AACxC,SAAQC,OAAO,QAAO,gBAAgB;AACtC,SAAQC,2BAA2B,QAAO,qBAAqB;AAAC;AAEhE,MAAMC,OAAO,GAAG,MAAM;EAAA;EAClB,MAAM;IAACC;EAAK,CAAC,GAAGP,KAAK,CAACQ,UAAU,CAACJ,OAAO,CAAC;EACzC,MAAM,CAACK,cAAc,EAAEC,iBAAiB,CAAC,GAAGV,KAAK,CAACW,QAAQ,CAAS,CAAC,CAAC;EAErE,MAAMC,eAAe,GAAGZ,KAAK,CAACa,OAAO,CACjC,MAAMR,2BAA2B,CAACE,KAAK,CAACO,UAAU,EAAE,CAAC,EACrD,CAACP,KAAK,CAACO,UAAU,EAAE,CAAC,CACvB;EAEDd,KAAK,CAACe,SAAS,CAAC,MAAM;IAClBL,iBAAiB,CAACE,eAAe,CAAC;EACtC,CAAC,EAAC,CAACL,KAAK,CAACO,UAAU,EAAE,CAAC,CAAC;EAEvB,oBACI,QAAC,IAAI;IACD,aAAa,eACT;MAAK,SAAS,EAAC,yBAAyB;MAAA,wBACpC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